#ifndef IMAGEGETIMAGERESPONSE_H
#define IMAGEGETIMAGERESPONSE_H

#include <network/networkresponse.h>

// Qt includes
#include <QUrl>
#include <QImage>


namespace Network {

class GetImageResponse : public Network::Response
{
    Q_OBJECT
public:
    explicit GetImageResponse(QObject *parent = 0);
    ~GetImageResponse();

public:

    virtual void parse(QNetworkReply &reply);
    bool isRedirected() const;
    const QImage &image() const;

private:
    virtual void parse(const QByteArray &data);

private:
    QImage m_image;
    QUrl m_baseUrl;
    bool m_redirected;
};

} // namespace Network
#endif // IMAGEGETIMAGERESPONSE_H
